// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   XmlPullParserException.java

package cn.com.youyuan.SDK.xmlpull.v1;

// Referenced classes of package org.xmlpull.v1:
//            XmlPullParser

public class XmlPullParserException extends Exception
{

    protected Throwable detail;
    protected int row;
    protected int column;

    public XmlPullParserException(String s)
    {
        super(s);
        row = -1;
        column = -1;
    }

    public XmlPullParserException(String msg, XmlPullParser parser, Throwable chain)
    {
        super((msg != null ? msg + " " : "") + (parser != null ? "(position:" + parser.getPositionDescription() + ") " : "") + (chain != null ? "caused by: " + chain : ""));
        row = -1;
        column = -1;
        if(parser != null)
        {
            row = parser.getLineNumber();
            column = parser.getColumnNumber();
        }
        detail = chain;
    }

    public Throwable getDetail()
    {
        return detail;
    }

    public int getLineNumber()
    {
        return row;
    }

    public int getColumnNumber()
    {
        return column;
    }

    public void printStackTrace()
    {
        if(detail == null)
            super.printStackTrace();
        else
            synchronized(System.err)
            {
                System.err.println(super.getMessage() + "; nested exception is:");
                detail.printStackTrace();
            }
    }
}
